<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:composite="http://java.sun.com/jsf/composite">
<h:head>
	<title>ICEfaces 3</title>
	<ice:outputStyle href="./xmlhttp/css/rime/rime.css" />
</h:head>
<h:body>
	
	<h:form id="exampleForm" prependId="false">
		<h2><span>Prueba de barra de progreso</span></h2>
		<ice:panelGroup>
			<ice:outputLabel value="Progreso: " />
			<ice:outputProgress id="progress" labelComplete="Finalizado"
				value="#{progressStyle.progress[0]}" />
		</ice:panelGroup>
		<ace:panel id="progressContent" style="width: 200px;">
			<ice:outputLabel value="Progreso: " />
			<ace:progressBar usePolling="true" pollingInterval="2000"
				id="progressBar" value="#{progressStyle.progress[0]}"
				widgetVar="prog" />
		</ace:panel>
		<h:commandButton id="upload" type="button" onclick="prog.start();"
			value="Start Reading Excel" actionListener="#{progressStyle.startTask}">
			<f:ajax execute="@this" render="@form" />
		</h:commandButton>
	</h:form>
	<ace:panel>
		<f:facet name="header">
			<span>Prueba de llamado a enumeración</span>
		</f:facet>
		<ice:outputText value="#{testenum.TEST1.text}"></ice:outputText>
		<br />
		<ice:outputText value="#{progressStyle.enumeration.values()[1].text}"></ice:outputText>
		<br />
		<ice:outputText value="Prueba de texto"></ice:outputText>
		<br />
		<ice:outputText value="#{progressStyle.enumerations[0].text}"></ice:outputText>
	</ace:panel>
	<ace:panel>
	<f:facet name="header">
		<span>Prueba de ValueChangeListener en selectOneRadio</span>
	</f:facet>
	<h:form>
		<ice:selectOneRadio
			valueChangeListener="#{progressStyle.selectDocumentFormat}"
			id="RBOpc" layout="spread" partialSubmit="true">
			<f:selectItems value="#{progressStyle.selectDocumentFormat}" />
		</ice:selectOneRadio>
		<ice:dataTable value="#{progressStyle.docFormat}" var="itemOpc">
			<ice:column>
				<ice:radio for="RBOpc" index="#{itemOpc.id}" />
			</ice:column>
		</ice:dataTable>
	</h:form>
	<ice:panelGroup style="float:right">
		<ice:outputLabel for="idCurrentDocumentFormat" value="Id: " />
		<ice:outputText id="idCurrentDocumentFormat"
			value="#{progressStyle.currentDocumentFormat.id}" />
		<ice:outputLabel for="nameCurrentDocumentFormat" value="Nombre: " />
		<ice:outputText value="#{progressStyle.currentDocumentFormat.name}" />
	</ice:panelGroup>
	</ace:panel>
	<br />
	<br />
	<br />
	<ice:form>
	<ace:panel header="Prueba de ValueChangeListener sobre selectOneCheckBox">
		<ice:panelGroup style="width: 100%; ">
			<ice:panelGroup style="width: 142px; float:left; ">
				<ice:panelGrid border="1" columns="2">
					<f:facet name="header">
						<span>Categories</span>
					</f:facet>
					<ice:panelSeries id="categories"
						value="#{progressStyle.categories}" var="idCategory"
						style="width: 100%; height: 128px; " varStatus="statusCategories">


						<ice:panelGroup
							style="background-color: #{statusCategories.index % 2 == 1 ? 'red;' : 'white;'};">

							<ice:commandLink actionListener="#{progressStyle.changeCategory}">

								<ice:outputLabel value="#{idCategory.name}" />
								<f:attribute name="currentCategory" value="#{idCategory}" />
							</ice:commandLink>
						</ice:panelGroup>
					</ice:panelSeries>
				</ice:panelGrid>
			</ice:panelGroup>

			<ice:panelGroup
				style="width: 549px; height: 171px; overflow-y:auto; overflow-x:hidden; ">
				<ice:dataTable
					value="#{progressStyle.categorySelected.archiveTypes}"
					var="archiveTypeFromCategory" id="archiveType"
					style="width: 542px; " varStatus="status">
					<ice:column
						style="width: 18px; text-align:center;background-color: #{status.index % 2 == 1 ? 'red;' : 'white;'};">
						<f:facet name="header">
							<ice:selectBooleanCheckbox id="selectAllArchiveTypes"
								value="#{progressStyle.categorySelected.selected}"
								valueChangeListener="#{progressStyle.selectAllArchiveTypes}"
								partialSubmit="true">
								<!-- immediate="true">  -->
								<span> </span>
							</ice:selectBooleanCheckbox>
						</f:facet>
						<!--progressStyle.categorySelected != null and !progressStyle.categorySelected.archiveTypes.empty -->
						<ice:selectBooleanCheckbox id="selectArchiveType"
							value="#{archiveTypeFromCategory.selected}"
							valueChangeListener="#{progressStyle.selectArchiveType}"
							partialSubmit="true">
							<!-- immediate="true"> -->
							<span> </span>
							<f:attribute name="archiveTypeFromCategory"
								value="#{archiveTypeFromCategory}" />
						</ice:selectBooleanCheckbox>
					</ice:column>
					<ice:column
						style="text-align:left; background-color: #{status.index % 2 == 1 ? 'red;' : 'white;'};">
						<f:facet name="header">
							<span>Nombre</span>
						</f:facet>
						<ice:outputText value="#{archiveTypeFromCategory.name}"
							style="text-transform: capitalize; font-style: normal" />
					</ice:column>
				</ice:dataTable>
			</ice:panelGroup>

		</ice:panelGroup>
		</ace:panel>
		<ace:panel header="Prueba de tooltip sobre ice:panelTab">
		<ice:panelGroup>


			<ice:panelTabSet
				style="font-size: 9;width: 128px; height: 68px;display: block;">
				<ice:panelTab label="Tab1">

					<f:facet name="label">
						<ice:panelGrid columns="2">
							<ice:panelGroup panelTooltip="pruebaInsideTab">
								<ice:graphicImage url="/img/Howto.png" alt="Image not found!!!" value="/img/Howto.png" />
							</ice:panelGroup>
							<ice:outputText value="Tab Prueba" />
						</ice:panelGrid>
					</f:facet>
					<ice:panelTooltip id="pruebaInsideTab" hideOn="mouseout">
						<f:facet name="body">
							<ice:outputText value="panel tooltip"></ice:outputText>
						</f:facet>
					</ice:panelTooltip>
					<ice:panelGrid>
						<ice:outputText value=" Tab Container1"></ice:outputText>
					</ice:panelGrid>
				</ice:panelTab>
				<ice:panelTab label="Tab2">
					<ice:panelGrid>
						<ice:outputText value=" Tab Container2"></ice:outputText>
					</ice:panelGrid>
				</ice:panelTab>
				<ice:panelTab label="Tab3">
					<ice:panelGrid>
						<ice:outputText value=" Tab Container3"></ice:outputText>
					</ice:panelGrid>
				</ice:panelTab>
			</ice:panelTabSet>
			<ice:graphicImage  url="/WEB-INF/img/Howto.png" value="/WEB-INF/img/Howto.png" alt="Image not found" />
		</ice:panelGroup>
		<h:graphicImage alt="Image not Found..." value="/img/Howto.png" />
		</ace:panel>
	</ice:form>
</h:body>
</html>